 <?php
/**
 * Description of stdLoginStrategy
 *
 * @author ������
 */
class stdLoginStrategy extends LoginStrategy {

    public function doLogin(User $user, $auth_data) {
            $request_user = $user->model->getUserDataByEmail($auth_data['email']);
            if ($request_user['user_password'] === md5(md5(trim($auth_data['password'])))) {
                return parent::_makeLogin($user, $request_user);
            } else {
                $user->isLogged = false;
                return false;
            }
    }

}
?>
